<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script src="spellcheck_test.js"></script>

<script>
// Regression test for crbug.com/640456

spellcheck_test(
    [
      '<div contenteditable>\n',
        '<span id="target">[|]</span>\n',
      '</div>'
    ].join(''),
    document => {
      document.getSelection().setClipboardData('zz.');
      document.execCommand('paste');
    },
    [
      '<div contenteditable>\n',
        '<span id="target">[#zz#.]</span>\n',
      '</div>'
    ].join(''),
    'Spelling markers should appear immediately after pasting.'
);
</script>
